define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'project.approve_log/index',
        add_url: 'project.approve_log/add',
        edit_url: 'project.approve_log/edit',
        delete_url: 'project.approve_log/delete',
        export_url: 'project.approve_log/export',
        modify_url: 'project.approve_log/modify',
    };

    return {

        index: function () {
            ea.table.render({
                init: init,
                cols: [[
                    {type: 'checkbox'},
                    {field: 'id', title: 'id'},
                    {field: 'project_id', search: 'select', selectList: projects, title: '项目'},
                    {field: 'status', search: 'select', selectList: notes?.status || {}, title: '状态(1:待审核,2:审核通过,3:审核拒绝)'},
                    {field: 'create_time', search: 'range', title: '创建时间'},
                    {field: 'update_time', search: 'range', title: '更新时间'},
                    {width: 250, title: '操作', templet: ea.table.tool},
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
});